package utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Terminal {
	
	private String classname;
	private DateFormat dateFormat;
	private Date date;

	public Terminal(String classname) {
		this.classname=classname;
		dateFormat = new SimpleDateFormat("dd/MM HH:mm:ss.SSS");
	}
	
	public void info(String msg){
		date = new Date();
		System.out.println("["+dateFormat.format(date)+"]["+classname+"]"+"[INFO]\t"+msg);
	}
	
	public void error(String msg){
		date = new Date();
		System.out.println("["+dateFormat.format(date)+"["+classname+"]"+"[ERROR]\t"+msg);
	}
	
	public void exception(String msg){
		date = new Date();
		System.out.println("["+dateFormat.format(date)+"["+classname+"]"+"[EXCEPTION]\t"+msg);
	}

}
